home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
web
/
fweb
/
fweb-1.30
/
manual
/
demo1.web
< prev
next >
Wrap
Text File
|
1993-06-16
|
1KB
|
51 lines
@z --- demo1.web ---
This file is part of FWEB. It and its woven output demo1.tex is included
into the user manual fwebman.tex.
Author: J. A. Krommes
Version: 1.23
Date: April 1, 1992
@x-----------------------------------------------------------------------------
\def\WEB{\.{WEB}} % A TeX macro definition in limbo.
@n/ @% The slash tells Fortran to recognize '//' as the start of a short
@% comment rather than the conventional concatenation symbol.
@* DEMO. This example demonstrates the use of named modules, and some other
features of~\WEB.
@#ifndef N
@m N 100 /* If you define this macro from the command line by
saying ``\.{-mN=200}'', that definition will
override this one. */
@#endif
@a
program main
@<Common declarations@>
@<Read data@>
@<Process data@>
@<Graph results@>
end
@ Accreting and inserting |common| declarations is an interesting use of
named modules.
@f @<Com...@> common
@<Com...@>=
real a(N)
common a
@ Possibly after many more modules that aren't shown here, we get to code
related to graphics. Here we accrete more information into the common
declarations. The discretized abscissa data is held in the array~|xx|; the
ordinate is in~|yy|.
@<Com...@>=
real xx(N), yy(n) // Example: |call curve(xx,yy,N,1)|
common/graphs/ xx,yy
@* INDEX.